$(function(){
	test();	
});

function test(){
		//获取店铺计划
		$.ajax({
			url: host+"getcollect/" ,
			dataType: "json",
			success: function(data){
				var html = "";
				for(v in data){
					html += '<div class="am-g collect">';
					html += '<div class="am-u-md-12">';
					html += '<p><span class="am-badge am-badge-danger">'+data[v]['name']+'</span></p>';
					html += '</div>';
					html += '<div class="am-u-md-12 collect-list">';
					for(vv in data[v]['child']){
						html += '<a target="_blank" href="'+data[v]['child'][vv]['url']+'" class="am-badge">'+data[v]['child'][vv]['name']+'</a>';
					}
					html += '</div>';
					html += '</div>';
				}
				$("#collect-content").html(html);
			}
		});		
	}